<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>作业</h2>
    <dl>
        <dt>必做：使用模板字符串打印99乘法表。</dt>
    </dl>
    <script>
        let obj = {
            name: "奉先",
            age: 34,
        }

        let str = "name: " + obj.name + ",age: " + obj.age;
        // 使用模板字符串大大地提高了拼接字符串的效率
        let str2 = `name: ${obj.name},age: ${obj.age}`;
        console.log(str == str2); //true

        function fn(a,b) {
            return a * b;
        }

        let [a,b] = [10,20];
        // 模板字符串甚至可以调用方法！
        str = `a * b = ${fn(a,b)}`;
        console.log(str);
    </script>
</body>
</html>